<div class="zdrwgzqd wcqk" [style.font-size]="fontSize">

    <nz-table #nzTable_bjwttj [nzData]="tableData" [nzScroll]="lockHeadScroll" [nzLoadingDelay]="1000" nzBordered
        [nzShowPagination]="false" [nzFrontPagination]="false" [nzNoResult]="''" nzSize="small" [nzLoading]="loading">
        <thead>

            <tr>
                <th nzAlign="center" nzWidth="50px">序号 </th>
                <th nzAlign="center" nzWidth="170px">录入时间 </th>
                <th nzAlign="center" nzWidth="420px">上周情况 </th>
                <th nzAlign="center">累计情况</th>
                <th nzAlign="center" nzWidth="220px">本周情况</th>
                <th nzAlign="center" nzWidth="120px">存在困难</th>
                <th nzAlign="center" nzWidth="100px">附件</th>
                <th nzAlign="center" nzWidth="60px" *ngIf="mode==='edit'">操作</th>
            </tr>
        </thead>
        <tbody class="table-body">
            <tr *ngFor="let data of tableData;index as i">
                <ng-container *ngIf="mode==='query';else tempEdit">
                    <!-- 序号 -->
                    <td nzAlign="center" [style.font-size]="fontSize">{{i+1}}
                    </td>
                    <!-- 录入时间 -->
                    <td nzAlign="center" [style.font-size]="fontSize">
                        {{data.sysDate}}</td>
                    <!-- 上周情况 -->
                    <td nzAlign="center" [style.font-size]="fontSize">
                        <div class="ljqkDiv">
                            {{data.lastWeek}}
                        </div>
                    </td>
                    <!-- 累计情况 -->
                    <td nzAlign="center" [style.font-size]="fontSize">
                        <div class="ljqkDiv">
                            {{data.totalComplete}}
                        </div>
                    </td>
                    <!-- 本周情况 -->
                    <td nzAlign="center" [style.font-size]="fontSize">
                        <div class="ljqkDiv">
                            {{data.thisWeek}}
                        </div>
                    </td>
                    <!-- 存在困难 -->
                    <td nzAlign="center" [style.font-size]="fontSize">
                        <div class="ljqkDiv">
                            {{data.difficulty}}
                        </div>
                    </td>
                    <!-- 附件 -->
                    <td>
                        <a href="javascript:void(0)" (click)="downloadFile(data)"
                            [style.font-size]="fontSize">{{data.fileName}}</a>
                    </td>
                </ng-container>
                <ng-template #tempEdit>
                    <!-- 序号 -->
                    <td nzAlign="center">{{i+1}}
                    </td>
                    <!-- 录入时间 -->
                    <td nzAlign="center">
                        <nz-date-picker nzShowTime [(ngModel)]="data._sysDate" nzFormat="yyyy-MM-dd HH:mm"
                            [nzStyle]="{width:'150px'}" (ngModelChange)="lrsjChange($event,data)">
                        </nz-date-picker>
                    </td>
                    <!-- 上周情况 -->
                    <td nzAlign="center">
                        <textarea class="table-textarea-scroll text-center" [(ngModel)]="data.lastWeek"
                            [nzAutosize]="{maxRows:30}" [style.font-size]="fontSize"></textarea>
                        <!-- {{data.lastWeek}} -->
                    </td>
                    <!-- 累计情况 -->
                    <td nzAlign="center">
                        <!-- {{data.totalComplete}} -->
                        <textarea class="table-textarea-scroll text-center" [(ngModel)]="data.totalComplete"
                            [nzAutosize]="{maxRows:30}" [style.font-size]="fontSize"></textarea>
                    </td>
                    <!-- 本周情况 -->
                    <td nzAlign="center">
                        <!-- {{data.thisWeek}} -->
                        <textarea class="table-textarea-scroll text-center" [(ngModel)]="data.thisWeek"
                            [nzAutosize]="{maxRows:30}" [style.font-size]="fontSize"></textarea>
                    </td>
                    <!-- 存在困难 -->
                    <td nzAlign="center">
                        <!-- {{data.difficulty}} -->
                        <textarea class="table-textarea-scroll text-center" [(ngModel)]="data.difficulty"
                            [nzAutosize]="{maxRows:30}" [style.font-size]="fontSize"></textarea>
                    </td>
                    <!-- 附件 -->
                    <td>
                        <a href="javascript:void(0)" (click)="downloadFile(data)">{{data.fileName}}</a>
                    </td>
                    <td nzAlign="center">
                        <div>
                            <button nz-button nzSize="small" (click)="update(data)">保存</button>
                        </div>
                        <div>
                            <button nz-button nzSize="small" (click)="deleteRow(data)">删除</button>
                        </div>
                    </td>
                </ng-template>


            </tr>
        </tbody>
    </nz-table>
    <div style="display: flex;justify-content: space-between;">
        <div class="pageWrap">
            每页
            <nz-select [(ngModel)]="pageSize" (ngModelChange)="query()">
                <nz-option nzValue="20" nzLabel="20"></nz-option>
                <nz-option nzValue="50" nzLabel="50"></nz-option>
                <nz-option nzValue="100" nzLabel="100"></nz-option>
                <nz-option nzValue="200" nzLabel="200"></nz-option>
            </nz-select> 条&nbsp;&nbsp;&nbsp;总共<span class="pageTotal">{{pageTotal}}</span>条
        </div>
        <div class="pageInation">
            <nz-pagination [nzPageSize]="pageSize" [(nzPageIndex)]="pageIndex" [nzTotal]="pageTotal"
                (nzPageIndexChange)="query()"></nz-pagination>
        </div>
    </div>

</div>